/*  1:   */ package org.intellij.lang.regexp.psi.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.lang.ASTNode;
import com.intellij.psi.tree.IElementType;
import org.intellij.lang.regexp.RegExpTT;
import org.intellij.lang.regexp.psi.RegExpBoundary;
import org.intellij.lang.regexp.psi.RegExpElementVisitor;
import org.jetbrains.annotations.NotNull;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public class RegExpBoundaryImpl
/* 12:   */   extends RegExpElementImpl
/* 13:   */   implements RegExpBoundary
/* 14:   */ {
/* 15:   */   public RegExpBoundaryImpl(ASTNode paramASTNode)
/* 16:   */   {
/* 17:29 */     super(paramASTNode);
/* 18:   */   }
/* 19:   */   
/* 20:   */   @NotNull
/* 21:   */   public RegExpBoundary.Type getType()
/* 22:   */   {
/* 23:34 */     IElementType localIElementType = getNode().getElementType();
/* 24:35 */     if (localIElementType == RegExpTT.CARET)
/* 25:   */     {
/* 26:36 */       RegExpBoundary.Type tmp20_17 = RegExpBoundary.Type.LINE_START;
/* 27:36 */       if (tmp20_17 == null) {
/* 28:36 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 29:   */       }
/* 30:36 */       return tmp20_17;
/* 31:   */     }
/* 32:37 */     if (localIElementType == RegExpTT.DOLLAR)
/* 33:   */     {
/* 34:38 */       RegExpBoundary.Type tmp65_62 = RegExpBoundary.Type.LINE_END;
/* 35:38 */       if (tmp65_62 == null) {
/* 36:38 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 37:   */       }
/* 38:38 */       return tmp65_62;
/* 39:   */     }
/* 40:40 */     assert (localIElementType == RegExpTT.BOUNDARY);
/* 41:41 */     String str = getUnescapedText();
/* 42:42 */     if (str.equals("\\b"))
/* 43:   */     {
/* 44:43 */       RegExpBoundary.Type tmp138_135 = RegExpBoundary.Type.WORD;
/* 45:43 */       if (tmp138_135 == null) {
/* 46:43 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 47:   */       }
/* 48:43 */       return tmp138_135;
/* 49:   */     }
/* 50:44 */     if (str.equals("\\B))"))
/* 51:   */     {
/* 52:45 */       RegExpBoundary.Type tmp185_182 = RegExpBoundary.Type.NON_WORD;
/* 53:45 */       if (tmp185_182 == null) {
/* 54:45 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 55:   */       }
/* 56:45 */       return tmp185_182;
/* 57:   */     }
/* 58:46 */     if (str.equals("\\A))"))
/* 59:   */     {
/* 60:47 */       RegExpBoundary.Type tmp232_229 = RegExpBoundary.Type.BEGIN;
/* 61:47 */       if (tmp232_229 == null) {
/* 62:47 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 63:   */       }
/* 64:47 */       return tmp232_229;
/* 65:   */     }
/* 66:48 */     if (str.equals("\\Z))"))
/* 67:   */     {
/* 68:49 */       RegExpBoundary.Type tmp279_276 = RegExpBoundary.Type.END_NO_LINE_TERM;
/* 69:49 */       if (tmp279_276 == null) {
/* 70:49 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 71:   */       }
/* 72:49 */       return tmp279_276;
/* 73:   */     }
/* 74:50 */     if (str.equals("\\z))"))
/* 75:   */     {
/* 76:51 */       RegExpBoundary.Type tmp326_323 = RegExpBoundary.Type.END;
/* 77:51 */       if (tmp326_323 == null) {
/* 78:51 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 79:   */       }
/* 80:51 */       return tmp326_323;
/* 81:   */     }
/* 82:52 */     if (str.equals("\\G))"))
/* 83:   */     {
/* 84:53 */       RegExpBoundary.Type tmp373_370 = RegExpBoundary.Type.PREVIOUS_MATCH;
/* 85:53 */       if (tmp373_370 == null) {
/* 86:53 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 87:   */       }
/* 88:53 */       return tmp373_370;
/* 89:   */     }
/* 90:56 */     if (!$assertionsDisabled) {
/* 91:56 */       throw new AssertionError();
/* 92:   */     }
/* 93:57 */      tmp423_422 = null;
/* 94:57 */     if (tmp423_422 == null) {
/* 95:57 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl", "getType" }));
/* 96:   */     }
/* 97:57 */     return tmp423_422;
/* 98:   */   }
/* 99:   */   
/* :0:   */   public void accept(RegExpElementVisitor paramRegExpElementVisitor)
/* :1:   */   {
/* :2:61 */     paramRegExpElementVisitor.visitRegExpBoundary(this);
/* :3:   */   }
/* :4:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.lang.regexp.psi.impl.RegExpBoundaryImpl

 * JD-Core Version:    0.7.0.1

 */